Create NuGet symbol packages - containing the .pdb files - corresponding to the primary NuGet packages. The process is described here: https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages . This will facilitate the debugging of problems in the controls code.
The CapsLock key should toggle only the letters. Currently, it behaves as Shift because it shows the secondary text of other keys as well (for example the number keys and their special characters). To reproduce this the ShowSecondaryText attribute of the corresponding key should be set to False.
To work this around, you can create a custom view model for the numeric keys that updates the DisplayText manually.
public class CustomKeyFactory : DefaultKeyFactory
{
public override BaseKeyViewModel CreateKey(int virtualKey, KeyType keyType = KeyType.Normal, string displayText = null, double width = 1, double height = 1, int alternateVirtualKey = -1, string alternateText = null, bool showSecondaryText = false)
{
if (keyType == KeyType.Normal)
{
return new CustomRegularKeyViewModel(virtualKey, width, height, showSecondaryText, displayText);
}
return base.CreateKey(virtualKey, keyType, displayText, width, height, alternateVirtualKey, alternateText, showSecondaryText);
}
}
public class CustomRegularKeyViewModel : RegularKeyViewModel
{
public CustomRegularKeyViewModel(int virtualKey, double keyWidth, double keyHeight, bool showSecondaryText, string displayText = null) : base(virtualKey, keyWidth, keyHeight, showSecondaryText, displayText)
{
}
public override void Update(IKeyUpdateContext context)
{
base.Update(context);
if (this.VirtualKey >= 48 && this.VirtualKey <= 57) // you may need to extend the if-statement to check for other keys as well
{
this.DisplayText = context.IsShiftActive ? this.ShiftText : this.LowerText;
}
}
}
As a result, the glyphs are not measured and positioned properly. The issue applies to the TrueType and Type1 fonts.
Please add an option to modify the corner radius for TrackBackground and UncheckedTrackBackground in the RadToggleSwitchButton template.
The radius of both rectangles is hard-coded to 9 (TrackBackground) / 12 (UncheckedTrackbackground) (Why are they different btw?). While it is possible to set the TrackHeight and TrackWidth to custom values, this doesn't really work well for the Fluent theme right now due to the radii quickly becoming disproportionally large or small compared to the TrackHeight. This results in the control losing its shape and becoming more and more egg-shaped or rectangular, depending on whether you decrease or increase the TrackHeight.
Ideally, the Radii would be automatically computed, depending on the selected TrackHeight (Floor(TrackHeight/2) ?), however, a manual solution would also be a lot better than nothing. That way we could at lease define proportionally matching values via styles.
An ObjectDisposedException exception is raised when a RadSvgImage is placed in a DataTemplate. It is present when the XmlSource property is utilized.
As a workaround, you can place the SVG string into a new .svg file and utilize the UriSource property of RadSvgImage.
Currently filtering with virtualized RadComboBox is not supported as the filtering feature works with the containers (changes their Visibility).
InvalidOperationException when closing a RadWindow opened on a separated UI thread. The exception message is: "Cannot use a DependencyObject that belongs to a different thread than its parent Freezable."
To work this around, you can merge the Telerik.Windows.Controls.Navigation.xaml dictionary in the Resources of all RadWindow instances open on another thread and then set their Style property to the RadWindowStyle from the merged .xaml dictionary.
<telerik:RadWindow x:Class="WpfApp84.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp84" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d" Height="450" Width="800" Style="{DynamicResource RadWindowStyle}">
<telerik:RadWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Controls.Navigation;component/Themes/GenericWindows11.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</telerik:RadWindow.Resources>
</telerik:RadWindow>